znp_interface_spi.h File Reference

public methods for znp_interface_spi.c More...

Defines

#define SRSP_BUFFER_SIZE   20
#define SRSP_HEADER_SIZE   3
#define SRSP_PAYLOAD_START   3
#define SRSP_LENGTH_FIELD   0
#define SRSP_CMD_LSB_FIELD   2
#define SRSP_CMD_MSB_FIELD   1

Functions

signed int sendMessage ()
signed int sendSreq ()
signed int spiPoll ()

Detailed Description

public methods for znp_interface_spi.c

Rev
619
Author
dsmith
Date
2010-07-02 10:54:13 -0700 (Fri, 02 Jul 2010)

YOU ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.


Function Documentation

signed int sendMessage (  ) 

Public method to send messages to the ZNP. This will send one message and then receive the Synchronous Response (SRSP) message from the ZNP to indicate the command was received.

Precondition:
znpBuf contains a properly formatted message
ZNP has been initialized
Postcondition:
buffer znpBuf contains the response (if any) from the ZNP.
Returns:
0 if the SRSP received was the expected SRSP, -11 if it was NOT the expected SRSP, -12 if sendSreq timeout, or -13 if too many bytes received.
signed int sendSreq (  ) 

Sends a CC2530ZNP Synchronous Request (SREQ) message and retrieves the response. A SREQ is a message to the ZNP that is immediately followed by a Synchronous Response (SRSP) message from the ZNP. As opposed to an Asynchronous Request (AREQ) message, which does not have a SRSP. This is a private method that gets wrapped by sendMessage().

Precondition:
CC2530ZNP has been initialized
znpBuf contains a properly formatted message
Postcondition:
received data is written to znpBuf
Returns:
0 if success, -1 if timeout waiting for SRDY to go low after chip select; -2 if timeout waiting for SRSP. : timeout on SRDY_IS_HIGH() and SRDY_IS_LOW(), or separate this method and return control to the application
signed int spiPoll (  ) 

Polls the ZNP for data. This is used to receive data from the ZNP, for example when a message has arrived. This will be initiated by detecting SRDY going low.

Precondition:
CC2530ZNP has been initialized.
SRDY has gone low
CC2530ZNP has been initialized
Postcondition:
received data is written to znpBuf
Returns:
result of sendSreq()
Note:
this method not required to be implemented when using UART interface.
 All Data Structures Files Functions Variables Defines
Generated on Thu Aug 19 11:47:25 2010 for Zigbee Network Processor Library by  doxygen 1.6.3